package com.to_door_recycle.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 回收人员收款表
 * @TableName recycler_collection
 */
@TableName(value ="recycler_collection")
@Data
public class RecyclerCollection implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 收款方式
     */
    @TableField(value = "collection_way")
    private String collectionWay;

    /**
     * 收款方式名
     */
    @TableField(value = "collection_name")
    private String collectionName;

    /**
     * 收款账户
     */
    @TableField(value = "collection_account")
    private String collectionAccount;

    /**
     * 用户的最近一次的编辑时间
     */
    @TableField(value = "edit_time")
    private Date editTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RecyclerCollection other = (RecyclerCollection) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCollectionWay() == null ? other.getCollectionWay() == null : this.getCollectionWay().equals(other.getCollectionWay()))
            && (this.getCollectionName() == null ? other.getCollectionName() == null : this.getCollectionName().equals(other.getCollectionName()))
            && (this.getCollectionAccount() == null ? other.getCollectionAccount() == null : this.getCollectionAccount().equals(other.getCollectionAccount()))
            && (this.getEditTime() == null ? other.getEditTime() == null : this.getEditTime().equals(other.getEditTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCollectionWay() == null) ? 0 : getCollectionWay().hashCode());
        result = prime * result + ((getCollectionName() == null) ? 0 : getCollectionName().hashCode());
        result = prime * result + ((getCollectionAccount() == null) ? 0 : getCollectionAccount().hashCode());
        result = prime * result + ((getEditTime() == null) ? 0 : getEditTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", collectionWay=").append(collectionWay);
        sb.append(", collectionName=").append(collectionName);
        sb.append(", collectionAccount=").append(collectionAccount);
        sb.append(", editTime=").append(editTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}